package com.test.model;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by 搬砖的小崔
 * 2016-3-17
 */
@Entity
@Table(name="rcc_d_temperaturePanelHistoricalData")
public class TemperaturePanelHistoricalData {
    private int temperaturePanelId;
    private Date planTime;
    private Date readTime;
    private Date equTime;
    private BigDecimal temperature;
    private Boolean isAlarm;
    private Boolean isFault;
    private TemperaturePanel temperaturePanel;
    private Boolean isFirstRecord;

    private String alarmSettingIds;
    private String faultTypeIds;

    @Column(name = "alarmSettingIds")
    public String getAlarmSettingIds() {
        return alarmSettingIds;
    }

    public void setAlarmSettingIds(String alarmSettingIds) {
        this.alarmSettingIds = alarmSettingIds;
    }

    @Column(name = "faultTypeIds")
    public String getFaultTypeIds() {
        return faultTypeIds;
    }

    public void setFaultTypeIds(String faultTypeIds) {
        this.faultTypeIds = faultTypeIds;
    }

    @Id
    @Column(name = "temperaturePanelId", unique = true, nullable = false)
    public int getTemperaturePanelId() {
        return temperaturePanelId;
    }

    public void setTemperaturePanelId(int temperaturePanelId) {
        this.temperaturePanelId = temperaturePanelId;
    }

    @Column(name = "planTime")
    public Date getPlanTime() {
        return planTime;
    }

    public void setPlanTime(Date planTime) {
        this.planTime = planTime;
    }

    @Column(name = "readTime")
    public Date getReadTime() {
        return readTime;
    }

    public void setReadTime(Date readTime) {
        this.readTime = readTime;
    }

    @Column(name = "equTime")
    public Date getEquTime() {
        return equTime;
    }

    public void setEquTime(Date equTime) {
        this.equTime = equTime;
    }

    @Column(name = "temperature")
    public BigDecimal getTemperature() {
        return temperature;
    }

    public void setTemperature(BigDecimal temperature) {
        this.temperature = temperature;
    }

    @Column(name = "isAlarm")
    public Boolean getIsAlarm() {
        return isAlarm;
    }

    public void setIsAlarm(Boolean isAlarm) {
        this.isAlarm = isAlarm;
    }

    @Column(name = "isFault")
    public Boolean getIsFault() {
        return isFault;
    }

    public void setIsFault(Boolean isFault) {
        this.isFault = isFault;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "temperaturePanelId",insertable=false,updatable=false)
    public TemperaturePanel getTemperaturePanel() {
        return temperaturePanel;
    }

    public void setTemperaturePanel(TemperaturePanel temperaturePanel) {
        this.temperaturePanel = temperaturePanel;
    }

    @Column(name = "isFirstRecord")
    public Boolean getIsFirstRecord() {
        return isFirstRecord;
    }

    public void setIsFirstRecord(Boolean isFirstRecord) {
        this.isFirstRecord = isFirstRecord;
    }
}
